#ifndef PLACE_SUB_CATEGORY_VIEW_H
#define PLACE_SUB_CATEGORY_VIEW_H

#include <QDialog>

#include "view_base.h"
#include "result_processor.h"
#include "data_types.h"

namespace Ui {
    class PlaceSubCategoryView;
}

class QListWidgetItem;
class PlaceListView;

class PlaceSubCategoryView : public ViewBase, ResultProcessor
{
    Q_OBJECT

public:
    explicit PlaceSubCategoryView(QWidget *parent = 0);
    ~PlaceSubCategoryView();

    virtual void IssueRequest();

  protected:
    virtual int ProcessResult(RequestMethod &r, QDomElement &e);

public slots:
    void showPlaceList(QListWidgetItem *item);
public:
    inline void setPlaceCategory(cate c) {
        cate_ = c;
    }

private:
    int parse_result(QDomElement &e);

private:
    Ui::PlaceSubCategoryView *ui;
    cate cate_;

    QVector<cate> placeSubCategories_;

    PlaceListView *placeListView_;
};

#endif // PLACE_SUB_CATEGORY_VIEW_H
